//按需引入antd的样式
//需要安装npm install react-app-rewired customize-cra babel-plugin-import
const {override, fixBabelImports, addLessLoader} = require('customize-cra')

module.exports = override(
    //针对antd，根据import进行按需打包(使用babel-plugin-import)
    fixBabelImports('import',{
        libraryName:'antd',
        libraryDirectory:'es',
        style:'css',//自动打包相关样式
    }),
    //修改主题颜色
    addLessLoader({
        modifyVars: { '@primary-color': 'green' },
        javascriptEnabled: true,
    })
)